﻿using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MTQ.DAL
{
    public  class Config
    {

        public static string GetConnStringTrial_Case(string name)//传入case名字
        {
            return GetConnStringByName("connectstringeTrial_Case_"+name);
        }

        public static string GetConnStringByName(string pName)
        {
            try
            {
                string strConn = ConfigurationManager.
                    ConnectionStrings[pName].ConnectionString;
                return strConn;
            }
            catch (Exception ex)
            {
                //Log.logger.Fatal("读取得数据库连接字符串[" + pName + "]失败:" + ex.Message);
                throw ex;
            }
        }
    }



}
